package org.looop.studio.bean.desc.impl;

import java.lang.reflect.InvocationTargetException;

import org.looop.studio.bean.desc.ValueDesc;
import org.looop.studio.bean.factory.BeanFactory;

public class BeanIdValueDesc implements ValueDesc {
	private String beanId;
	
	public BeanIdValueDesc(String beanId) {
		super();
		this.beanId = beanId;
	}

	public String getBeanId() {
		return beanId;
	}

	public void setBeanId(String beanId) {
		this.beanId = beanId;
	}

	@Override
	public Object getValue(BeanFactory beanFactory) throws IllegalArgumentException, SecurityException, InstantiationException, IllegalAccessException, ClassNotFoundException, InvocationTargetException, NoSuchMethodException {
		return beanFactory.getBean(beanId);
	}

}
